package com.lhn.tankGame3;

import javax.swing.*;

/**
 * @author lhn
 * @date 2024-07-24 18:05
 */

public class TankGame03 extends JFrame {

    private MyPanel myPanel = null;

    public static void main(String[] args) {
        new TankGame03();
    }

    public TankGame03() {
        myPanel = new MyPanel();

        //每个100ms重绘一次
        Thread thread = new Thread(myPanel);
        thread.start();

        this.add(myPanel);
        this.setSize(1000, 750);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setVisible(true);
        this.addKeyListener(myPanel);
    }
}
